import { defineStore } from 'pinia'

export const useNewCardStore = defineStore('newCard', {
  state: () => {
    return {
      previewUrl: '',
      fileInput: '',
    }
  },
  actions: {
    setprevImg(src, ref) {
      this.previewUrl = src
      this.fileInput = ref.value
    },
    clearUrl() {
      this.previewUrl = ''
      this.fileInput.value = ''
    }
  }
})
